﻿using SharpGL;
using System;
namespace MutsiEngine
{
    public class GameObject : MoveableObject
    {
        public Mesh mesh;
        public Quaternion Rotation = Quaternion.Identity;

        public GameObject()
        {
            this.Name = "GameObject";
        }

        public void LoadContent(string path)
        {
            mesh = ContentLoader.LoadMesh(path);
        }

        public virtual void Update()
        {
            
        }

        public virtual void Draw(GameTime gameTime, OpenGL gl)
        {
            gl.PushMatrix();
            gl.MultMatrix(Rotation.GetMatrix());
            gl.Translate(position.X,position.Y,position.Z);
            mesh.Draw(gl);
            gl.PopMatrix();
        }
    }
}
